<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020\9\15 0015
  Time: 14:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>admin-product-addproductattribute</title>
    <%@include file="/views/common/headerStyle.jsp" %>
</head>
<body>
<div class="container">
    <%@include file="/views/common/header.jsp" %>
    <div class="row main_box">
        <div class="col-sm-3"><%@include file="/views/common/leftMenu.jsp" %></div>
        <div class="col-sm-9">
            <div></div>

            <div>
                <form action="${BASE_PATH}admin/product/insertproductattribute" method="post">
                    <div class="form-group">
                        <label for="attr_name">属性名称:</label>
                        <input type="text" class="form-control" id="attr_name" name="attr_name"  aria-describedby="nameHelp">
                        <small id="nameHelp" class="form-text text-muted">属性的名称.</small>
                    </div>
                    <div class="form-group">
                        <label for="model_type">模型分类:</label>
                        <select class="form-control" id="model_type" name="mod_id">
                            <c:forEach items="${productTypeList}" var="item">
                                <option value="${item.id}" <c:if test="${item.id==mod_id}"> selected </c:if> >${item.model_name}</option>
                            </c:forEach>
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="attr_group">搜索支持:</label>
                        <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="attr_index" id="no_search" value="0" checked>
                        <label class="form-check-label" for="no_search">不检索</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_index" id="key_search" value="1">
                            <label class="form-check-label" for="key_search">关键词检索</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_index" id="like_search" value="2">
                            <label class="form-check-label" for="like_search">范围检索</label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="attr_group">属性关联:</label><div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="is_linked" id="linked_true" value="1">
                        <label class="form-check-label" for="linked_true">是</label>
                    </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="is_linked" id="is_linked" value="0" checked>
                            <label class="form-check-label" for="is_linked">否</label>
                        </div>
                        <small id="attgroupHelp" class="form-text text-muted">相同属性值的商品是否关联?</small>
                    </div>
                    <div class="form-group">
                        <label for="attr_group">属性形式:</label>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_type" id="r_only" value="0" checked>
                            <label class="form-check-label" for="r_only" >唯一属性</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_type" id="r_radio" value="1">
                            <label class="form-check-label" for="r_radio">单选属性</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_type" id="r_check" value="2">
                            <label class="form-check-label" for="r_check">复选属性</label>
                        </div>
                        <small class="form-text text-muted">属性是否可选(浏览,单选,复选)?</small>
                    </div>

                    <div class="form-group">
                        <label for="attr_group">录入方式:</label>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_input_type" id="r_text" value="0" checked>
                            <label class="form-check-label" for="r_text">手工单行</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_input_type" id="r_area" value="2">
                            <label class="form-check-label" for="r_area">手工多行</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="attr_input_type" id="r_option" value="1">
                            <label class="form-check-label" for="r_option">列表下拉框</label>
                        </div>
                        <small class="form-text text-muted">从下面的列表中选择（一行代表一个可选值）</small>
                    </div>

                    <div class="form-group">
                        <label for="attr_group">可选值列表:</label>
                        <textarea class="form-control" id="attr_group"  name="attr_values" placeholder="一行代表一个可选值" aria-describedby="attvaluesHelp" ></textarea>
                        <small id="attvaluesHelp" class="form-text text-muted">该属性值的录入方式</small>
                    </div>
                    <button type="submit" class="btn btn-primary">保存</button>
                </form>





            </div>




        </div>
    </div>
    <%@include file="/views/common/footer.jsp" %>
</div>
</body>
<%@include file="/views/common/footerStyle.jsp" %>
</html>

